package com.zhida.chatservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author ling
 * @since 2024-07-28
 */
@Getter
@Setter
@TableName("mute")
public class Mute implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "mute_id", type = IdType.AUTO)
    private Integer muteId;

    /**
     * 被禁言群聊。如果为-1，则默认所有群聊
     */
    @TableField("group_id")
    private Integer groupId;

    /**
     * 操作人
     */
    @TableField("username")
    private String username;

    /**
     * 被禁言人
     */
    @TableField("mute_username")
    private String muteUsername;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("mute_time")
    private String muteTime;

    /**
     * 1：禁言中，2：解除禁言，3：禁言结束
     */
    @TableField("status")
    private Integer status;

    public Mute(String username, String muteUsername, String muteTime, int groupId) {
        this.groupId = groupId;
        this.username = username;
        this.muteUsername = muteUsername;
        this.muteTime = muteTime;
    }
}
